from ZAnimation import ZAnimation
from ZNode import ZNode
from lib.res.fun import _cutImg , _create_image


class ZSprite ( ZNode ) :
	def __init__ ( self , father , filename ) :
		super ( ZSprite , self ).__init__ ( )
		self.father = father
		self.images = _cutImg ( _create_image ( filename ) )
		self.animate = ZAnimation ( self )
		self.animate.load ( [ self.images [ 0 ] , self.images [ 1 ] , self.images [ 2 ] ] )
		self.rect = self.images [ 0 ].get_rect ( )

	def start ( self ) :
		self._running = True

	def stop ( self ) :
		self._running = False
